#ifndef GOWILDPROTOCOL_H
#define GOWILDPROTOCOL_H

#include <QObject>
#include <serializer.h>
#include <parser.h>
#include "Protocol/BaseProtocol.h"
#include "DataType/PortStruct.h"

class GowildProtocol : public BaseProtocol
{
    Q_OBJECT
public:
    explicit GowildProtocol(QObject *parent = 0);
    QList<Package> parseData(QByteArray data);
    QByteArray generateData(Package package);

    enum FunctionCode
    {
        GowildSearch = 0x0000,
        GowildRequestHeartbeat = 0x0001,
        GowildResponseHeartbeat = 0x0002,
        GowildControl = 0x0003,
        GowildRequestDeviceList = 0x0005,
        GowildResponseDeviceList = 0x0006,
        GowildRequestSceneList = 0x0007,
        GowildResponseSceneList = 0x0008,
        GowildRequestRoomList = 0x0009,
        GowildResponseRoomList = 0x000A,
        GowildRequestFloorList = 0x000B,
        GowildResponseFloorList = 0x000C,
    };


private:
    enum CheckSteps
    {
        CHECK_HEAD,
        CHECK_LENGTH,
        CHECK_FUNCTION,
        CHECK_BODY,
        CHECK_CHECKCODE,
    };


};

#endif // GOWILDPROTOCOL_H
